#include<iostream>
using namespace std;
int main()
{
	int arr[9] = { 4,2,8,0,5,7,1,3,9 };
	for (int i = 0; i < 9; i++)
	{
		cout << arr[i] <<endl;
	}
	cout << " " << endl;
	for (int a = 0; a < 8; a++)
	{
		for (int b = 0; b < 8; b++)
		{
			int temp = 0;
			if (arr[b] > arr[b + 1])
			{
				int temp = arr[b];
				arr[b] = arr[b + 1];
				arr[b + 1] = temp;
			}
		}
	}
	for (int i = 0; i < 9; i++)
	{
		cout << arr[i] << endl;
	}

	system("pause");
	return 0;
}